from google.appengine.ext.webapp import template
from creoleparser.core import Parser
from creoleparser.dialects import Creole10
from string import lower


wiki2html = Parser(dialect=Creole10(
    use_additions = True,
    no_wiki_monospace = False,
    wiki_links_base_url = '/fonts/',
    wiki_links_space_char = '-',
    wiki_links_path_func = lower
))


register = template.create_template_register()
register.filter('wiki2html', lambda x: wiki2html(x))
